package com.baizhi.service.impl;

import com.baizhi.dao.AdminDao;
import com.baizhi.entity.Admin;
import com.baizhi.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by Lenovo on 2019/6/17.
 */
@Service
@Transactional
public class AdminServiceImpl implements AdminService{
    @Autowired
    private AdminDao adminDao;
    //查询(登录)
    @Override
    public Admin selectOne(String username, String password) {
        Admin admin = adminDao.selectOne(username, password);
        return admin;
    }
    //修改密码
    @Override
    public void update(Admin admin) {
        adminDao.update(admin);
    }
}
